<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:84:"D:\wwwroot\fangcms\fangcms_city_add\public/../application/home\view\index\house.html";i:1493976920;s:86:"D:\wwwroot\fangcms\fangcms_city_add\public/../application/home\view\public\footer.html";i:1493803247;}*/ ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<!-- manifest="cache.manifest" -->
<head>
    <meta charset="utf-8" />
    <title><?php echo $seo['title']; ?></title>
    <meta name="keywords" content="<?php echo $seo['keys']; ?>" />
    <meta name="description" content="<?php echo $seo['desc']; ?>" />
    <link type="text/css" rel="stylesheet"  href="__CSS__/format_dom.css"/>
    <link type="text/css" rel="stylesheet"  href="__CSS__/main.css"/>
    <!--[if lte IE 8]>
    <script src="__JS__/ie/html5shiv.js"></script>
    <![endif]-->
    <!--[if IE 6]>
    <script type="text/javascript" src="__JS__/DD_belatedPNG.js"></script>
    <script type="text/javascript">DD_belatedPNG.fix("*")</script>
    <![endif]-->
    <script src="__PUBLIC__/js/jquery.min.js"></script>
</head>
<body>
<div class="top_bg">
    <div class="top">
        <span class="logo"><img src="<?php echo $site['pcLogo']; ?>" width="80" height="64"></span>
        <div class="city_bg">
            <div class="city"><span class="city_span city-box"></span><?php echo $cityInfo['name']; ?></div><a href="javascript:;" class="qh_btn city-box">[切换]</a>
        </div>
        <div class="city_box" id="CPM" style="display:none;">
            <div class="cities-con">
                <p class="tit">选择城市 <a href="<?php echo url('Index/index@www'); ?>" class="gd_btn">更多城市</a></p>
                <ul class="cities-opts clearfix">
                    <?php if(is_array($city) || $city instanceof \think\Collection || $city instanceof \think\Paginator): $i = 0; $__LIST__ = $city;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                    <li class="clearfix">
                        <em class="icons"><?php echo $key; ?></em>
                        <p>
                            <?php if(is_array($vo) || $vo instanceof \think\Collection || $vo instanceof \think\Paginator): $i = 0; $__LIST__ = $vo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?>
                            <a <?php if($val['is_hot'] == 1): ?>class="highlight"<?php endif; ?> href="<?php echo url('Index/index@'.$val['domain']); ?>"><?php echo $val['name']; ?></a>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </p>
                    </li>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
                <i></i>
            </div>
            <a href="javascript:;" class="close_btn">×</a>
        </div>
        <div class="ind_login">
            <?php if(empty($userInfo) || (($userInfo instanceof \think\Collection || $userInfo instanceof \think\Paginator ) && $userInfo->isEmpty())): ?>
            <a href="<?php echo url('user.login/index'); ?>" class="ind_login01">登录</a>
            <a href="<?php echo url('user.login/reg'); ?>" class="ind_login02">注册</a>
            <?php else: ?>
             <span style="color:#ff0000;"><?php echo $userInfo['nickname']; ?></span>,欢迎您的到来 <a href="<?php echo url('user.index/index'); ?>">会员中心</a> | <a href="<?php echo url('user.login/logout'); ?>">退出</a>
            <?php endif; ?>
        </div>
        <div class="nav">
            <ul>
                <?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['pos'] == 1): if(!(empty($vo['url']) || (($vo['url'] instanceof \think\Collection || $vo['url'] instanceof \think\Paginator ) && $vo['url']->isEmpty()))): $url = $vo['url']; else: if(!(empty($vo['alias']) || (($vo['alias'] instanceof \think\Collection || $vo['alias'] instanceof \think\Paginator ) && $vo['alias']->isEmpty()))): $url=url($vo['model'].'/detail',['cate'=>$vo['alias']]); else: $url=url($vo['model'].'/index'); endif; endif; ?>
                <li><a href="<?php echo $url; ?>" target="<?php echo $vo['open_type']; ?>" <?php if($vo['model'] == $controller): ?>class="on"<?php endif; ?>><?php echo $vo['title']; ?></a></li>
                <?php endif; endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>

    </div>
    <div class="search">
        <div class="search_body">
            <div class="tab01">
                <ul class="idTabs" id="search-tab">
                    <li><a href="javascript:;" class="selected">新房</a></li>
                    <li><a href="javascript:;">二手房</a></li>
                </ul>
            </div>
            <div id="search-content">
            <div id="tab01">
                <div class="float_r"><a href="<?php echo url('Map/index'); ?>" class="map_but">地图找房</a></div>
                <div class="search_box">
                    <div class="search_input">
                        <form action="<?php echo url('Loupan/index'); ?>" id="info_form">
                        <input name="keyword" type="text" class="s_input" data-uri="<?php echo url('Ajax/autoHouseComplate'); ?>" id="title" placeholder="请输入楼盘名称">
                        <a href="javascript:;" class="but01">搜索</a>
                        </form>
                        <div class="auto-complate">
                            <ul>
                            </ul>
                        </div>
                    </div>
                    <p class="overflow_h">
                        <span>区域：</span>
                        <?php if(is_array($area) || $area instanceof \think\Collection || $area instanceof \think\Paginator): $i = 0; $__LIST__ = $area;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <i><a href="<?php echo url('Loupan/index',['area'=>$vo['id']]); ?>"><?php echo $vo['name']; ?></a></i>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </p>
                    <p class="overflow_h">
                        <span>价格：</span>
                        <?php $_result=getHousePrice();if(is_array($_result) || $_result instanceof \think\Collection || $_result instanceof \think\Paginator): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <i><a href="<?php echo url('Loupan/index',['price'=>$key]); ?>"><?php echo $vo['name']; ?></a></i>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </p>
                </div>
            </div>

            <div id="tab02" style="display:none">
                <div class="float_r"><a href="<?php echo url('Map/second_house'); ?>" class="map_but">地图找房</a></div>
                <div class="search_box">
                    <div class="search_input">
                        <form action="<?php echo url('Second/index'); ?>" id="second-form">
                        <input name="keyword" type="text" class="s_input" data-uri="<?php echo url('Ajax/autoSecondComplate'); ?>" id="stitle" placeholder="请输入房源称">
                        <a href="javascript:;" class="but01">搜索</a>
                        </form>
                        <div class="auto-complate">
                            <ul>
                            </ul>
                        </div>
                    </div>
                    <p class="overflow_h">
                        <span>区域：</span>
                        <?php if(is_array($area) || $area instanceof \think\Collection || $area instanceof \think\Paginator): $i = 0; $__LIST__ = $area;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <i><a href="<?php echo url('Second/index',['area'=>$vo['id']]); ?>"><?php echo $vo['name']; ?></a></i>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </p>
                    <p class="overflow_h">
                        <span>价格：</span>
                        <?php $_result=getSecondPrice();if(is_array($_result) || $_result instanceof \think\Collection || $_result instanceof \think\Paginator): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <i><a href="<?php echo url('Second/index',['price'=>$key]); ?>"><?php echo $vo['name']; ?></a></i>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </p>
                </div>
            </div>
            </div>
        </div>
    </div>
</div>

<div>
    <div class="index_ico">
        <ul>
            <li><span class="index_ico_01"></span><b>上千合作新房楼盘</b><p>上百万真实二手房源任你选</p></li>
            <li><span class="index_ico_02"></span><b>30分钟内快速响应</b><p>线上支付更快捷</p></li>
            <li><span class="index_ico_03"></span><b>专业经纪人一对一服务</b><p>完善的售后服务体系</p></li>
            <li><span class="index_ico_03"></span><b>最高30%团购返现</b><p>二手房成交免过户费</p></li>
        </ul>
    </div>
    <?php if(!(empty($group) || (($group instanceof \think\Collection || $group instanceof \think\Paginator ) && $group->isEmpty()))): ?>
    <div class="i_group overflow_h">
        <div class="i_group_t"><b>团购优惠</b><p>上<?php echo $site['title']; ?>买房，最高立减30%团购费</p></div>
        <div class="i_group_box ">
            <ul>
                <?php if(is_array($group) || $group instanceof \think\Collection || $group instanceof \think\Paginator): $i = 0; $__LIST__ = $group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <li>
                    <div class="i_g_img"><a href="<?php echo url('Tuangou/detail',['id'=>$vo['id']]); ?>" title="<?php echo $vo['title']; ?>"><img src="__IMG__/loading.gif" class="lazy" data-original="<?php echo $vo['img']; ?>" alt="<?php echo $vo['title']; ?>" width="280" height="207"></a></div>
                    <b><a href="<?php echo url('Tuangou/detail',['id'=>$vo['id']]); ?>" title="<?php echo $vo['title']; ?>"><?php echo $vo['title']; ?></a></b>
                    <p>团购价：<?php if(empty($vo['price']) || (($vo['price'] instanceof \think\Collection || $vo['price'] instanceof \think\Paginator ) && $vo['price']->isEmpty())): ?>暂无报价<?php else: ?><?php echo $vo['price']; ?>元/㎡<?php endif; ?></p>
                    <p class="text01 nowarp" title="<?php echo $vo['youhui']; ?>"><?php echo $site['title']; ?>优惠：<?php echo $vo['youhui']; ?></p>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>

            </ul>
        </div>
    </div>
    <?php endif; ?>
    <div class="cpr">
        <div class="title02"><b>精品推荐</b><p>精品楼盘，只为您推荐</p></div>
        <div class="main">
            <div class="cpr_img">
                <!-- 焦点图 开始 -->
                <div id="fsD1" class="focus" >
                    <div id="D1pic1" class="fPic slides-content">
                        <?php if(is_array($new_house) || $new_house instanceof \think\Collection || $new_house instanceof \think\Paginator): $i = 0; $__LIST__ = $new_house;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <div class="fcon">
                            <a target="_blank" title="<?php echo $vo['title']; ?>" href="<?php echo url('Loupan/detail',['id'=>$vo['id']]); ?>"><img src="<?php echo $vo['img']; ?>" alt="<?php echo $vo['img']; ?>"></a>
                            <span class="shadow"><a target="_blank" href="<?php echo url('Loupan/detail',['id'=>$vo['id']]); ?>"><?php echo $vo['title']; ?></a></span>
                        </div>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </div>
                    <div class="fbg">
                        <div class="D1fBt switchable-nav" id="D1fBt">
                        </div>
                    </div>
                    <span class="prev"></span>
                    <span class="next"></span>
                </div>

                <!-- 焦点图 结束 -->
            </div>
            <form action="<?php echo url('Ajax/demand'); ?>" method="post" id="xuqiu_form">
            <div class="cpr_inp">
                <b>发布购房需求</b>
                <p>
                    <select class="c_selsct" name="area" id="area">
                        <option value="0">请选择房屋区域</option>
                        <?php if(is_array($area) || $area instanceof \think\Collection || $area instanceof \think\Paginator): $i = 0; $__LIST__ = $area;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <option value="<?php echo $siteInfo['name']; ?><?php echo $vo['name']; ?>"><?php echo $vo['name']; ?></option>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                </p>
                <p>
                    <select class="c_selsct" name="price" id="price">
                        <option value="0">意向价格</option>
                        <?php $_result=getSecondPrice();if(is_array($_result) || $_result instanceof \think\Collection || $_result instanceof \think\Paginator): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <option value="<?php echo $vo['name']; ?>"><?php echo $vo['name']; ?></option>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                </p>
                <p>
                    <select class="c_selsct" name="mianji" id="mianji">
                        <option value="0">意向面积</option>
                        <option value="50平米以下">50平米以下</option>
                        <option value="50-60平米">50-60平米</option>
                        <option value="60-80平米">60-80平米</option>
                        <option value="80-100平米">80-100平米</option>
                        <option value="100-120平米">100-120平米</option>
                        <option value="120平米以上">120平米以上</option>
                    </select>
                </p>
                <p>
                    <input type="text"  class="c_selsct" name="mobile" id="mobile" style="width:290px;" placeholder="请填写联系电话">
                </p>
                <p><a href="javascript:;" id="demand-btn" class="but02">立即提交</a></p>
            </div>
            </form>
        </div>
    </div>

    <div class="i_h_r overflow_h">
        <div class="i_group_t">
            <b><?php echo $cityInfo['name']; ?>新房推荐</b>
        </div>
        <div class="i_h_r01" id="house01">
            <ul class="clearfix">
                <?php if(is_array($house_position) || $house_position instanceof \think\Collection || $house_position instanceof \think\Paginator): $i = 0; $__LIST__ = $house_position;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <li <?php if($i % 4 != 0): ?>class="mar01"<?php endif; ?>>
                    <div class="i_g_img">
                        <div class="i_h_r01_t"><a href="<?php echo url('Loupan/detail',['id'=>$vo['house_id']]); ?>" title="<?php echo $vo['title']; ?>"><?php echo $vo['title']; ?></a></div>
                        <a href="<?php echo url('Loupan/detail',['id'=>$vo['house_id']]); ?>" title="<?php echo $vo['title']; ?>"><img src="__IMG__/loading.gif" class="lazy" data-original="<?php echo $vo['img']; ?>" width="280" height="207"></a>
                    </div>
                    <div class="i_h_r01_t2">
                        <p class="overflow_h"><span><i><?php echo $vo['data']['average_price']; ?></i>元/平米</span><?php echo $vo['data']['city_name']; ?> <?php echo $vo['data']['area_name']; ?></p>
                        <p style="border-bottom:none"><?php echo $vo['data']['address']; ?></p>
                    </div>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>

            </ul>
        </div>
    </div>
    <?php if(!(empty($second_position) || (($second_position instanceof \think\Collection || $second_position instanceof \think\Paginator ) && $second_position->isEmpty()))): ?>
    <div class="i_s_h">
        <div class="i_group_t">
            <b><?php echo $cityInfo['name']; ?>二手房推荐</b>
        </div>

        <div class="i_s_h01">
            <ul class="clearfix">
                <?php if(is_array($second_position) || $second_position instanceof \think\Collection || $second_position instanceof \think\Paginator): $i = 0; $__LIST__ = $second_position;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <li <?php if($i % 4 != 0): ?>class="mar01"<?php endif; ?>>
                    <div class="i_g_img"><a href="<?php echo url('Second/detail',['id'=>$vo['house_id']]); ?>" title="<?php echo $vo['title']; ?>"><img src="__IMG__/loading.gif" alt="<?php echo $vo['title']; ?>" class="lazy" data-original="<?php echo $vo['img']; ?>" width="280" height="207"></a></div>
                    <b><span><i><?php echo $vo['data']['total_price']; ?></i>万</span><a href="<?php echo url('Second/detail',['id'=>$vo['house_id']]); ?>" title="<?php echo $vo['title']; ?>" class="nowarp" style="width:170px;"><?php echo $vo['title']; ?></a></b>
                    <p><?php echo $vo['data']['city_name']; ?><?php echo $vo['data']['area_name']; ?>  <?php echo $vo['data']['room']; ?>房<?php echo $vo['data']['ting']; ?>厅 <?php echo $vo['data']['mianji']; ?>m<sup>2</sup></p>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>
    </div>
    <?php endif; ?>
</div>
<div class="footer clearfix">
    <div class="main">
        <div class="footer_n1">
            <span>服务热线：<?php echo $site['telphone']; ?></span>
            <ul>
                <?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['pos'] == 2): if(!(empty($vo['url']) || (($vo['url'] instanceof \think\Collection || $vo['url'] instanceof \think\Paginator ) && $vo['url']->isEmpty()))): $url = $vo['url']; else: if(!(empty($vo['alias']) || (($vo['alias'] instanceof \think\Collection || $vo['alias'] instanceof \think\Paginator ) && $vo['alias']->isEmpty()))): $url=url($vo['model'].'/detail',['cate'=>$vo['alias']]); else: $url=url($vo['model'].'/index'); endif; endif; ?>
                <li><a target="<?php echo $vo['open_type']; ?>" href="<?php echo $url; ?>"><?php echo $vo['title']; ?></a> </li>
                <?php endif; endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>
        <div class="footer_n2 overflow_h">
            <div class="tab02 overflow_h">
                <ul class="idTabs" id="recmond-tab">
                    <li><a href="javascript:;" class="selected"><?php echo $cityInfo['name']; ?>新房推荐</a></li>
                    <li><a href="javascript:;"><?php echo $cityInfo['name']; ?>二手房推荐</a></li>
                    <li><a href="javascript:;">友情链接</a></li>
                </ul>
            </div>
            <div id="recmond-box">
            <div class="f_n3" id="second01">
                <ul>
                    <?php if(is_array($area) || $area instanceof \think\Collection || $area instanceof \think\Paginator): $i = 0; $__LIST__ = $area;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                    <li><a href="<?php echo url('Loupan/index',['area'=>$vo['id']]); ?>" title="<?php echo $vo['name']; ?>"><?php echo $vo['name']; ?>新房</a></li>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
            </div>
            <div class="f_n3" id="second03" style="display:none">
                <ul>
                    <?php if(is_array($area) || $area instanceof \think\Collection || $area instanceof \think\Paginator): $i = 0; $__LIST__ = $area;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                    <li><a href="<?php echo url('Second/index',['area'=>$vo['id']]); ?>" title="<?php echo $vo['name']; ?>"><?php echo $vo['name']; ?>二手房</a></li>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
            </div>
            <div class="f_n3" id="second04" style="display:none">
                <ul>
                    <?php $obj = model("link");$obj->where("status=1");$obj->field("name,url");$obj->order("ordid asc,id desc");$name = $obj->limit(50)->select();if(is_array( $name ) || $name  instanceof \think\Paginator): $i = 0; $__LIST__ = $name;if( count($__LIST__)==0 ) : echo "暂无数据" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                    <li><a href="<?php echo $vo['url']; ?>" title="<?php echo $vo['name']; ?>" target="_blank"><?php echo $vo['name']; ?></a></li>
                    <?php endforeach; endif; else: echo "暂无数据" ;endif; ?>
                </ul>
            </div>
            </div>
        </div>
        <div class="footer_n3 clearfix">
            <div class="footer_n3_1">
                <p>Copyright © <?php echo date("Y"); ?> <?php echo config('url_domain_root'); ?>. All Rights Reserved ICP备案号：<?php echo $site['icp']; ?></p>
                <p>公司名称：<?php echo $site['companyname']; ?></p>
            </div>
            <div class="footer_n3_2" >
                <ul>
                    <li>
                        <span><img src="<?php echo $site['weixin_pic']; ?>" width="90" height="90"></span>
                        <p>关注<?php echo $site['title']; ?>微信</p>
                    </li>
                </ul>
            </div>
        </div>

    </div>
</div>
<?php echo $site['countcode']; ?>
<script src="__PUBLIC__/js/plugins/jquery.lazyload.js"></script>
<script>
    $(function(){
        $("img.lazy").lazyload({
            threshold : 100,
            effect : "fadeIn"
        });
        $('.city-box').bind('click',function(){
            $('#CPM').toggle();
        });
        $('.close_btn').bind('click',function(){
            $('#CPM').hide();
        });
        $("#recmond-tab li").bind('click',function(){
            var index = $(this).index();
            $(this).find('a').addClass('selected').parent().siblings().find('a').removeClass('selected');
            $("#recmond-box").children().eq(index).show().siblings().hide();
        });
    });
</script>
<script type="text/html" id="template">
    {{# for(var i = 0,len = d.length;i < len;i++){ }}
    <li>
        <a href="{{d[i].url}}" title="{{d[i].title}}">
            <div>{{d[i].title}}(<span>{{d[i].price}}元/m<sup>2</sup></span>)</div>
            <div class="address">{{d[i].address}}</div>
        </a>
    </li>
    {{# } }}
</script>
<script src="__PUBLIC__/js/plugins/jquery.slide-packer.js"></script>
<script src="__PUBLIC__/js/plugins/jquery.ajax.form.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/layer/laytpl.js"></script>
<script>
    $(function(){
        $('.but01').bind('click',function(){
           var keyword = $(this).parent().find($('input[name="keyword"]')).val();
            if(keyword.length == 0){
                layer.msg('请填写关键词',{icon:2});
            }else{
                $(this).parent('form').submit();
            }
        });
        $("input[name='keyword']").bind('keyup',function(){
            var url = $(this).data('uri'),keyword = $.trim($(this).val()),me=$(this);
            if(keyword.length == 0){
                layer.msg('请输入关键词',{icon:2});
                return false;
            }
            var param = {keyword: keyword};
            $.get(url,param,function(data){
                var box = me.parents('.search_input').find('.auto-complate');
                if(data.status == 1){
                    if(data.data){
                        box.show();
                        var gettpl = document.getElementById('template').innerHTML;
                        laytpl(gettpl).render(data.data, function(html){
                            box.find('ul').html(html);
                        });
                    }else{
                        box.hide().find('ul').html('');
                    }
                }else{
                    box.hide().find('ul').html('');
                }
            });
        });
        $('#fsD1').slide({
            effect: 'fade',
            speed: 500,
            contentCls: 'slides-content',
            prevBtnCls: 'prev',
            nextBtnCls: 'next',
            evtype: 'mouse'
        });
        $('#search-tab li').bind('click',function(){
            var index = $(this).index();
            $(this).find('a').addClass('selected').parent().siblings().find('a').removeClass('selected');
            $('#search-content').children().eq(index).show().siblings().hide();
        });
        $('#demand-btn').bind('click',function(){
            var area = $('#area').val(),mianji = $('#mianji').val(),price = $('#price').val(),mobile = $('#mobile').val();
            if(area == 0){
                layer.msg('请选择区域！',{icon:2});
                return false;
            }
            if(mianji == 0){
                layer.msg('请选择面积！',{icon:2});
                return false;
            }
            if(price == 0){
                layer.msg('请选择价格！',{icon:2});
                return false;
            }
            if(!/^1[34578][0-9]{9}$/.test(mobile)){
                layer.msg('请填写正确的手机号码！',{icon:2});
                return false;
            }
            $('#xuqiu_form').submit();
        });
        $('#xuqiu_form').ajaxForm({success:complate,dataType:'json'});
        function complate(result){
            if(result.status == 1){
                layer.msg(result.msg,{icon:1});
                setTimeout(function(){
                    window.location.href = location.href + '?t='+Math.random();
                },3000);
            } else {
                layer.msg(result.msg,{icon:2});
            }
        }
    });
</script>
</body>
</html>
